import request from '@/utils/request'

// 查询排期列表
export function listScheduling(query) {
  console.log('query::::::', query)
  return request({
    url: '/ips/scheduling/list',
    method: 'get',
    params: query
  })
}

// 查询排期详细
export function getScheduling(id) {
  return request({
    url: '/ips/scheduling/' + id,
    method: 'get'
  })
}

// 新增排期
export function addScheduling(data) {
  return request({
    url: '/ips/scheduling/save',
    method: 'post',
    data: data
  })
}

// 修改排期
export function editScheduling(data) {
  return request({
    url: '/ips/scheduling/update',
    method: 'put',
    data: data
  })
}

// 发布修改排期
export function editReleaseScheduling(data) {
  return request({
    url: '/ips/scheduling/releaseUpdate',
    method: 'put',
    data: data
  })
}

// 排期取消发布
export function cancelReleaseScheduling(id) {
  return request({
    url: '/ips/scheduling/cancelRelease/' + id,
    method: 'delete'
  })
}

// 删除排期
export function delScheduling(id) {
  return request({
    url: '/ips/scheduling/remove/' + id,
    method: 'delete'
  })
}

// 导出排期
export function exportScheduling(query) {
  return request({
    url: '/ips/scheduling/export',
    method: 'get',
    params: query
  })
}
